package com.jack.mvvmexample.activity

import android.os.Bundle
import android.util.Log
import androidx.lifecycle.Observer
import com.jack.mvvmexample.R
import com.jack.mvvmexample.databinding.ActivityLoginBinding
import com.jack.mvvmexample.vm.HomeViewModel

class LoginActivity : com.aleyn.mvvm.base.BaseActivity<HomeViewModel,ActivityLoginBinding>() {

    override fun layoutId(): Int =  R.layout.activity_login

    override fun initView(savedInstanceState: Bundle?) {

    }

    override fun initData() {
        Log.e("Chat","------------》")
       viewModel.run {
           viewModel.getHomeList()
               .observe(this@LoginActivity, Observer {
                   Log.e("Chat","it ${it.size}")
               })
       }
    }
}